package com.bj.zspace.bytebuddy.normal_test;

/**
 * @Author:liuwenqing
 * @Date:2025/1/7 10:50
 * @Description:
 **/
public class SecuredService extends Service{

    @Override
    public void deleteEverything() throws IllegalStateException {
        if (UserHolder.user.equals("ADMIN")) {
            super.deleteEverything();
        } else {
            throw new IllegalStateException("Not authorized");
        }
    }
}
